<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>未支付订单</title>
<c:import url="/ctrl/header"></c:import>
</head>
<body>
  <c:import url="/ctrl/top"></c:import>
  <div class="container">
    <div class="row-fluid">
      <c:import url="/ctrl/menu">
        <c:param name="pageId">
          <c:out value="${pageId}" />
        </c:param>
      </c:import>
      <!--/span-->
      <div class="span10">
        <h3 class="greybg">未支付订单</h3>
        <table
          class="table table-bordered table-striped responsive-utilities table-hover">
          <thead>
            <tr>
              <th>订单号</th>
              <th>保险名称</th>
              <th>被保人数</th>
              <th>订单金额</th>
              <th>订单时间</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody>
            <c:choose>
              <c:when test="${pager.rowCount>0}">
                <c:forEach var="orders" items="${orderList}">
                  <tr>
                    <td><a
                      href="/order/detail?id=<c:out value="${orders.orderId}" />"
                      target="_blank"><c:out
                          value="${orders.orderNo}" /></a></td>
                    <td><c:out value="${orders.orderProductName}" /></td>
                    <td><c:out value="${orders.orderPersonCount}" /></td>
                    <td><fmt:formatNumber var="orderRealAmount"
                        type="currency" pattern="￥.00"
                        value="${orders.orderRealAmount}" /> <c:out
                        value="${orderRealAmount}" /></td>
                    <td><fmt:formatDate var="orderCreatedOn"
                        pattern="yyyy-MM-dd HH:mm"
                        value="${orders.orderCreatedOn}" /> <c:out
                        value="${orderCreatedOn}" /></td>
                    <td><a
                      href="/order/pay?id=<c:out value="${orders.orderId}" />"
                      target="_blank">立即支付</a></td>
                  </tr>
                </c:forEach>
              </c:when>
              <c:otherwise>
                <tr>
                  <td colspan="6" style="text-align: center;">没有相关信息</td>
                </tr>
              </c:otherwise>
            </c:choose>

          </tbody>
        </table>

        <c:import url="/ctrl/pager">
          <c:param name="index" value="${pager.index}" />
          <c:param name="rowcount" value="${pager.rowCount}" />
          <c:param name="params" value="${pager.params}" />
          <c:param name="pagesize" value="${pager.pageSize}" />
          <c:param name="pagename" value="/order/unpaid" />
        </c:import>

      </div>
    </div>
    <hr />
    <c:import url="/ctrl/bottom"></c:import>
  </div>

  <c:import url="/ctrl/footer"></c:import>
</body>
</html>